<template>
  <router-view v-slot="{ Component }" :key="key">
    <keep-alive>
      <component :is="Component" />
    </keep-alive>
  </router-view>
  <n-message-provider>
    <Message />
  </n-message-provider>
</template>

<script lang="ts" setup>
import { useRoute } from 'vue-router'
const route = useRoute()
const key = computed(() => {
  return route.fullPath
})
</script>

<style lang="scss">
#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  padding: 0;
  margin: 0;
  background: #efefef;
}
</style>
